class BookInstance {
    BookProfile profile
    String status
    static belongsTo = [owner:User]

    static constraints = {
        profile(nullable:false)
        status(blank:false, inList:['OPEN','INEXCHANGE','DISABLED'])
    }

    String toString() {"${profile.name}[$status]"}
}